package org.yanh.common.enums;
public enum ResultCode {
    SUCCESS("200", "成功"),
    FAIL("500", "失败"),
    LOGIN_ERROR("A1000", "用户名或密码错误"),
    LOGIN_EMPTY_ERROR("A1001", "用户名或者密码不能为空"),
    LOGIN_STATUS_ERROR("A1002", "用户已禁用"),
    LOGOUT_ERROR("A1003", "用户登出失败"),

    UNKNOWN_ERROR("B2000", "未知错误"),
    PARAMETER_ILLEGAL("B2001", "参数不合法"),

    TOKEN_INVALID("C3000", "token 已过期或验证不正确！"),
    TOKEN_SIGNATURE_INVALID("C3000", "无效的签名"),
    TOKEN_EXPIRED("C3000", "token 已过期"),
    TOKEN_MISSION("C3000", "token 缺失"),
    TOKEN_CHECK_INFO_FAILED("C3000", "token 信息验证失败"),
    REFRESH_TOKEN_INVALID("C3000", "refreshToken 无效");

    private final String code;
    private final String message;
    ResultCode(String code, String message) {
        this.code = code;
        this.message = message;
    }
    public String getCode() {
        return code;
    }
    public String getMessage() {
        return message;
    }
}